The file “CD Remote Programs” is used by the CD Remote desk accessory and these XCMDs to retain information about a CD. This file contains some initial data, plus three resources for each CD that has been entered into the database. The three resource types are “IndX”, “ProG”, and “STR#”. There is only one “IndX” resource, number 128, in the “CD Remote Programs” file. There is a “ProG” and “STR#” resource for each CD for which we have stored information.
The initial two bytes of the “IndX” resource are a version number. The next two bytes are the number of CDs in the database. The “IndX” resource contains a six byte entry for each CD. The first byte is the number of tracks on the CD. The next three bytes are the number of (1/75th of a second) blocks on the CD. The last two bytes are the resource number of the ProG and STR# resources for this CD.
A new resource number is obtained by calling the Resource Manager Unique1ID call. The “ProG” resource contains the sequence for playing the audio tracks. By default, it goes from 1 to n, where n is the number of tracks on the CD. The numbers are stored in BCD.
The “STR#” resource contains a list of strings. The first string is the volume title. The next n strings contain the titles of each of the tracks on the CD, in their normal order (i.e. this order matches with the “ProG” resource order; the nth+1 title is for track n only if the “ProG” resource is in normal, default order.) If the user has changed the track order, the STR# changes as well.
An example IndX resource:
0010 0002 0B50 0240 276B 0C44 1365 1D0C
version number: 1.0
number of discs we know about: 2
number of tracks on disc: 11
CD Identification: 5,243,456 blocks (1/75th of a second) on this disc